From 0d813683fa99e8594cfcb5dedadd866493b1adfd Mon Sep 17 00:00:00 2001 From: Tamas K Lengyel Date: Fri, 26 Sep 2014 15:51:57 +0200 Subject: [PATCH] relocate struct npfec definition into common Nested page fault exception code definitions can be reused on ARM as well. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich Acked-by: Tim Deegan --- xen/include/asm-x86/hvm/hvm.h | 2 +- xen/include/asm-x86/mm.h | 21 --------------------- xen/include/xen/mm.h | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index c09e16bed7..0d94c48cd8 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include /* Interrupt acknowledgement sources. */ enum hvm_intsrc { diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index aae63eecf2..dca298fb64 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -549,27 +549,6 @@ void audit_domains(void); #endif -/* - * Extra fault info types which are used to further describe - * the source of an access violation. - */ -typedef enum { - npfec_kind_unknown, /* must be first */ - npfec_kind_in_gpt, /* violation in guest page table */ - npfec_kind_with_gla /* violation with guest linear address */ -} npfec_kind_t; - -/* - * Nested page fault exception codes. - */ -struct npfec { - unsigned int read_access:1; - unsigned int write_access:1; - unsigned int insn_fetch:1; - unsigned int gla_valid:1; - unsigned int kind:2; /* npfec_kind_t */ -}; - int new_guest_cr3(unsigned long pfn); void make_cr3(struct vcpu *v, unsigned long mfn); void update_cr3(struct vcpu *v); diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index 7c0efc7ae1..74a65a61f5 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -88,6 +88,27 @@ int assign_pages( /* Dump info to serial console */ void arch_dump_shared_mem_info(void); +/* + * Extra fault info types which are used to further describe + * the source of an access violation. + */ +typedef enum { + npfec_kind_unknown, /* must be first */ + npfec_kind_in_gpt, /* violation in guest page table */ + npfec_kind_with_gla /* violation with guest linear address */ +} npfec_kind_t; + +/* + * Nested page fault exception codes. + */ +struct npfec { + unsigned int read_access:1; + unsigned int write_access:1; + unsigned int insn_fetch:1; + unsigned int gla_valid:1; + unsigned int kind:2; /* npfec_kind_t */ +}; + /* memflags: */ #define _MEMF_no_refcount 0 #define MEMF_no_refcount (1U<<_MEMF_no_refcount) -- 2.30.2